package com.blog.blog.common;

import java.util.Collections;
import java.util.List;

/**
 * 通用分页返回模型
 */
public class PageResponse<T> {
    private long total;
    private List<T> records;

    public PageResponse() {
        this.records = Collections.emptyList();
    }

    public PageResponse(long total, List<T> records) {
        this.total = total;
        this.records = records;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getRecords() {
        return records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }
}


